import config from '../config/config';
import request from '../utils/request';

let service = {};


service.queryorderlogistics = (param, cb, ca) => {
  param = param || {};

  let requestUrl = config.api.tracklogistics;
  request({
    url: requestUrl,
    showLoading: true,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    },
    fail: res => {

    },
    complete: res => {
      if (ca && (typeof ca) == 'function') {
        ca(res);
      }
    }
  });
}
//西集物流追踪
service.trackslogisticsxiji = (param, cb, ca) => {
  param = param || {};

  let requestUrl = config.api.trackslogisticsxiji;
  request({
    url: requestUrl,
    showLoading: true,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    },
    fail: res => {

    },
    complete: res => {
      if (ca && (typeof ca) == 'function') {
        ca(res);
      }
    }
  });
}

module.exports = service;